<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>APP</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
</head>
<body>
<div class="aui-content-padded" style="margin-top:15px;">
    <div class="aui-btn aui-btn-primary" tapmode onclick="hide();">隐藏</div>
    <div class="aui-btn aui-btn-warning" tapmode onclick="show();">显示</div>
</div>

<div class="aui-content-padded">
    <code>
        apiready = function(){
            api.parseTapmode();
            $api.append($api.dom('body'),'&lt;div class="aui-loading"&gt;&lt;div class="aui-loading-1"&gt;&lt;/div&gt;&lt;div class="aui-loading-2"&gt;&lt;/div&gt;&lt;/div&gt;');
        }<br/>
        function hide(){
            $api.remove($api.dom('.aui-loading'));
        }<Br/>
        function show(){
            $api.append($api.dom('body'),'&lt;div class="aui-loading"&gt;&lt;div class="aui-loading-1"&gt;&lt;/div&gt;&lt;div class="aui-loading-2"&gt;&lt;/div&gt;&lt;/div&gt;');
        }
    </code>
</div>
</body>

<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript">
    apiready = function(){
        api.parseTapmode();
        $api.append($api.dom('body'),'<div class="aui-loading"><div class="aui-loading-1"></div><div class="aui-loading-2"></div></div>');
    }
    function hide(){
        $api.remove($api.dom('.aui-loading'));
    }
    function show(){
        var loading = $api.dom(".aui-loading");
        if(!loading){
            $api.append($api.dom('body'),'<div class="aui-loading"><div class="aui-loading-1"></div><div class="aui-loading-2"></div></div>');
        }
        
    }
</script>
</html>